// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import FastClick from 'fastclick'
import VueRouter from 'vue-router'
import App from './App'
import router from './router/index'
// import axios from 'axios'
import { get, post } from './js/ajax'
import utils from './js/utils'
import 'lib-flexible/flexible'
import { AlertPlugin,ToastPlugin  } from 'vux'
//复制到粘贴板插件
import VueClipboard from 'vue-clipboard2'
VueClipboard.config.autoSetContainer = true
Vue.use(VueClipboard)

Vue.use(AlertPlugin)
Vue.use(ToastPlugin)
// 把 get，post 方法挂载到 vue 实例上
Vue.prototype.$http = { get, post }
// 添加方法到 vue 实例的原型链上
Vue.use(utils)
Vue.use(VueRouter)

// console.log(router)

// Vue.use(axios);
// const routes = [{
//   path: '/',
//   component: Home
// },
// // {
// //   path: '/list',
// //   component: './views/HelloWorld.vue'
// // }
// ]

// const router = new VueRouter({
//   routes
// })

FastClick.attach(document.body)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  router,
  render: h => h(App)
}).$mount('#app-box')